home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 116_01.zip / TURN.C < prev    next >
Text File  |  1993-06-19  |  14KB  |  816 lines

  1.  
  2.  /* TURN.C  no mods for V 1.43  */
  3. #include "advent.h"
  4.  
  5. /*
  6.     Routine to take 1 turn
  7. */
  8. turn()
  9. {
  10.     char i;
  11.     /*
  12.         if closing, then he can't leave except via
  13.         the main office.
  14.     */
  15.     if (newloc < 9 && newloc != 0 && closing) {
  16.         rspeak(130);
  17.         newloc = loc;
  18.         if (!panic)
  19.             clock2 = 15;
  20.         panic = 1;
  21.     }
  22.     /*
  23.         see if a dwarf has seen him and has come
  24.         from where he wants to go.
  25.     */
  26.     if (newloc != loc && !forced(loc) && cond[loc]&NOPIRAT == 0)
  27.         for (i=1; i<(DWARFMAX-1); ++i)
  28.             if (odloc[i] == newloc && dseen[i]) {
  29.                 newloc = loc;
  30.                 rspeak(2);
  31.                 break;
  32.             }
  33.     dwarves();
  34.     /*
  35.         on to the regular move.
  36.     */
  37.     if(loc != newloc){
  38.         ++turns;
  39.         loc=newloc;
  40.         /* check for death */
  41.         if(loc==0) {
  42.             death();
  43.             return;
  44.         }
  45.         /* check for forced move */
  46.         if(forced(loc)) {
  47.             describe();
  48.             domove();
  49.             return;
  50.         }
  51.         /* check for wandering in dark */
  52.         if(wzdark && dark() && pct(35)) {
  53.             rspeak(23);
  54.             oldloc2=loc;
  55.             death();
  56.             return;
  57.         }
  58.         /* describe his situation */
  59.         describe();
  60.         if(!dark()) {
  61.             ++visited[loc];
  62.             descitem();
  63.         }
  64.     }
  65.     if (closed) {
  66.         if (prop[OYSTER] < 0 && toting(OYSTER))
  67.             pspeak(OYSTER,1);
  68.         for (i=1; i <= MAXOBJ; ++i)
  69.             if (toting(i) && prop[i] < 0)
  70.                 prop[i] = -1-prop[i];
  71.     }
  72.     wzdark = dark();
  73.     if (knfloc > 0 && knfloc != loc)
  74.         knfloc = 0;
  75.     /*
  76.         run the timer routine
  77.     */
  78.     if (stimer())
  79.         return;
  80.     /* ask what he wants to do */
  81.     /* debug */
  82.     if (dbgflg)
  83.         printf("Your current location is %d\n",loc);
  84.     while(!english())
  85.         ;
  86.     /* act on his instructions */
  87.     if(motion)
  88.         domove();
  89.     else if(object)
  90.         doobj();
  91.     else
  92.         itverb();
  93. }
  94.  
  95. /*
  96.     Routine to describe current location
  97. */
  98. describe()
  99. {
  100.     if(toting(BEAR))
  101.         rspeak(141);
  102.     if(dark())
  103.         rspeak(16);
  104.     else if(visited[loc])
  105.         descsh(loc);
  106.     else
  107.         desclg(loc);
  108.     if(loc==33 && pct(25) && !closing)
  109.         rspeak(8);
  110. }
  111.  
  112. /*
  113.     Routine to describe visible items
  114. */
  115. descitem()
  116. {
  117.     int i,state;
  118.  
  119.     for(i=1;i<MAXOBJ;++i) {
  120.         if(at(i)) {
  121.             if(i==STEPS && toting(NUGGET))
  122.                 continue;
  123.             if(prop[i]<0) {
  124.                 if(closed)
  125.                     continue;
  126.                 else {
  127.                     prop[i]=0;
  128.                     if(i==RUG || i==CHAIN)
  129.                         ++prop[i];
  130.                     --tally;
  131.                 }
  132.             }
  133.             if(i==STEPS && loc==fixed[STEPS])
  134.                 state=1;
  135.             else
  136.                 state=prop[i];
  137.             pspeak(i,state);
  138.         }
  139.     }
  140.     if(tally==tally2 && tally != 0 && limit > 35)
  141.         limit = 35;
  142. }
  143.  
  144. /*
  145.     Routine to handle motion requests
  146. */
  147. domove()
  148. {
  149.     gettrav(loc);
  150.     switch(motion) {
  151.     case NULLX:
  152.         break;
  153.     case BACK:
  154.         goback();
  155.         break;
  156.     case LOOK:
  157.         if(detail++<3)
  158.             rspeak(15);
  159.         wzdark=0;
  160.         visited[loc]=0;
  161.         newloc=loc;
  162.         loc=0;
  163.         break;
  164.     case CAVE:
  165.         if(loc<8)
  166.             rspeak(57);
  167.         else
  168.             rspeak(58);
  169.         break;
  170.     default:
  171.         oldloc2=oldloc;
  172.         oldloc=loc;
  173.         dotrav();
  174.     }
  175. }
  176.  
  177. /*
  178.     Routine to handle request to return
  179.     from whence we came!
  180. */
  181. goback()
  182. {
  183.     int kk,k2,want,temp;
  184.     struct trav strav[MAXTRAV];
  185.  
  186.     if(forced(oldloc))
  187.         want=oldloc2;
  188.     else
  189.         want=oldloc;
  190.     oldloc2=oldloc;
  191.     oldloc=loc;
  192.     k2=0;
  193.     if(want==loc) {
  194.         rspeak(91);
  195.         return;
  196.     }
  197.     copytrv(travel,strav);
  198.     for(kk=0;travel[kk].tdest!=-1;++kk) {
  199.         if(!travel[kk].tcond && travel[kk].tdest==want) {
  200.             motion=travel[kk].tverb;
  201.             dotrav();
  202.             return;
  203.         }
  204.         if(!travel[kk].tcond) {
  205.             k2=kk;
  206.             temp=travel[kk].tdest;
  207.             gettrav(temp);
  208.             if(forced(temp) && travel[0].tdest==want)
  209.                 k2=temp;
  210.             copytrv(strav,travel);
  211.         }
  212.     }
  213.     if(k2) {
  214.         motion=travel[k2].tverb;
  215.         dotrav();
  216.     }
  217.     else
  218.         rspeak(140);
  219. }
  220.  
  221. /*
  222.     Routine to copy a travel array
  223. */
  224. copytrv(trav1,trav2)
  225. struct trav *trav1,*trav2;
  226. {
  227.     int i;
  228.  
  229.     for(i=0;i<MAXTRAV;++i) {
  230.         trav2 -> tdest = trav1 -> tdest;
  231.         trav2 -> tverb = trav1 -> tverb;
  232.         trav2 -> tcond = trav1 -> tcond;
  233.     }
  234. }
  235.  
  236. /*
  237.     Routine to figure out a new location
  238.     given current location and a motion.
  239. */
  240. dotrav()
  241. {
  242.     char mvflag,hitflag,kk;
  243.     int rdest,rverb,rcond,robject;
  244.     int pctt;
  245.  
  246.     newloc=loc;
  247.     mvflag=hitflag=0;
  248.     pctt = rand()%100;
  249.     for(kk=0;travel[kk].tdest>=0 && !mvflag; ++kk) {
  250.         rdest = travel[kk].tdest;
  251.         rverb = travel[kk].tverb;
  252.         rcond = travel[kk].tcond;
  253.         robject = rcond%100;
  254.         if(rverb != 1 && rverb != motion && !hitflag)
  255.             continue;
  256.         ++hitflag;
  257.         switch(rcond/100) {
  258.         case 0:
  259.             if(rcond==0 || pctt < rcond)
  260.                 ++mvflag;
  261.             /* debug */
  262.             if(rcond)
  263.                 printf("\% move %d %d\n",
  264.                     pctt,mvflag);
  265.             break;
  266.         case 1:
  267.             if(robject==0)
  268.                 ++mvflag;
  269.             else if(toting(robject))
  270.                 ++mvflag;
  271.             break;
  272.         case 2:
  273.             if(toting(robject) || at(robject))
  274.                 ++mvflag;
  275.             break;
  276.         case 3:
  277.         case 4:
  278.         case 5:
  279.         case 7:
  280.             if(prop[robject] != (rcond/100)-3)
  281.                 ++mvflag;
  282.             break;
  283.         default:
  284.             bug(37);
  285.         }
  286.     }
  287.     if(!mvflag)
  288.         badmove();
  289.     else if(rdest>500)
  290.         rspeak(rdest-500);
  291.     else if(rdest>300)
  292.         spcmove(rdest);
  293.     else
  294.         newloc = rdest;
  295. }
  296.  
  297. /*
  298.     The player tried a poor move option.
  299. */
  300. badmove()
  301. {
  302.     int msg;
  303.  
  304.     msg=12;
  305.     if(motion >= 43 && motion <=50) msg=9;
  306.     if(motion == 29 || motion == 30) msg=9;
  307.     if(motion == 7 || motion==36 || motion==37) msg=10;
  308.     if(motion==11 || motion==19) msg=11;
  309.     if(verb==FIND || verb==INVENTORY) msg=59;
  310.     if(motion==62 || motion==65) msg=42;
  311.     if(motion==17) msg=80;
  312.     rspeak(msg);
  313. }
  314.  
  315. /*
  316.     Routine to handle very special movement.
  317. */
  318. spcmove(rdest)
  319. int rdest;
  320. {
  321.     switch(rdest-300) {
  322.     case 1:  /* plover movement via alcove */
  323.         if(!holding || (holding==1 && toting(EMERALD)))
  324.             newloc=(99+100)-loc;
  325.         else
  326.             rspeak(117);
  327.         break;
  328.     case 2:  /* trying to remove plover, bad route */
  329.         drop(EMERALD,loc);
  330.         break;
  331.     case 3:  /* troll bridge */
  332.         if(prop[TROLL]==1) {
  333.             pspeak(TROLL,1);
  334.             prop[TROLL]=0;
  335.             move(TROLL2,0);
  336.             move((TROLL2+MAXOBJ),0);
  337.             move(TROLL,117);
  338.             move((TROLL+MAXOBJ),122);
  339.             juggle(CHASM);
  340.             newloc=loc;
  341.         }
  342.         else {
  343.             newloc=(loc==117 ? 122 : 117);
  344.             if(prop[TROLL]==0)
  345.                 ++prop[TROLL];
  346.             if(!toting(BEAR))
  347.                 return;
  348.             rspeak(162);
  349.             prop[CHASM]=1;
  350.             prop[TROLL]=2;
  351.             drop(BEAR,newloc);
  352.             fixed[BEAR]=-1;
  353.             prop[BEAR]=3;
  354.             if(prop[SPICES]<0)
  355.                 ++tally2;
  356.             oldloc2=newloc;
  357.             death();
  358.         }
  359.         break;
  360.     default:
  361.         bug(38);
  362.     }
  363. }
  364.  
  365.  
  366. /*
  367.     Routine to handle player's demise via
  368.     waking up the dwarves...
  369. */
  370. dwarfend()
  371. {
  372.     death();
  373.     normend();
  374. }
  375.  
  376. /*
  377.     normal end of game
  378. */
  379. normend()
  380. {
  381.     score();
  382.     exit();
  383. }
  384.  
  385. /*
  386.     scoring
  387. */
  388. score()
  389. {
  390.     int t,i,k,s;
  391.     s = t = 0;
  392.     for (i=50; i<=MAXTRS; ++i) {
  393.         if (i==CHEST)
  394.             k = 14;
  395.         else if (i > CHEST)
  396.             k = 16;
  397.         else 
  398.             k = 12;
  399.         if (prop[i] >= 0)
  400.             t += 2;
  401.         if (place[i] == 3 && prop[i] == 0)
  402.             t += k-2;
  403.     }
  404.     printf("%-20s%d\n","Treasures:",s=t);
  405.     t = (MAXDIE - numdie)*10;
  406.     if (t)
  407.         printf("%-20s%d\n","Survival:",t);
  408.     s += t;
  409.     if (!gaveup)
  410.         s += 4;
  411.     t = dflag ? 25 : 0;
  412.     if (t)
  413.         printf("%-20s%d\n","Getting well in:",t);
  414.     s += t;
  415.     t = closing ? 25 : 0;
  416.     if (t)
  417.         printf("%-20s%d\n","Masters section:",t);
  418.     s += t;
  419.     if (closed) {
  420.         if (bonus == 0)
  421.             t = 10;
  422.         else if (bonus == 135)
  423.             t = 25;
  424.         else if (bonus == 134)
  425.             t = 30;
  426.         else if (bonus == 133)
  427.             t = 45;
  428.         printf("%-20s%d\n","Bonus:",t);
  429.         s += t;
  430.     }
  431.     if (place[MAGAZINE] == 108)
  432.         s += 1;
  433.     s += 2;
  434.     printf("%-20s%d\n","Score:",s);
  435. }
  436.  
  437. /*
  438.     Routine to handle the passing on of one
  439.     of the player's incarnations...
  440. */
  441. death()
  442. {
  443.     char yea,i,j,k;
  444.  
  445.     if (!closing) {
  446.         yea = yes(81+numdie*2,82+numdie*2,54);
  447.         if (++numdie >= MAXDIE || !yea)
  448.             normend();
  449.         place[WATER] = 0;
  450.         place[OIL] = 0;
  451.         if (toting(LAMP))
  452.             prop[LAMP] = 0;
  453.         for (j=1; j<101; ++j) {
  454.             i = 101-j;
  455.             if (toting(i))
  456.                 drop(i,i==LAMP ? 1:oldloc2);
  457.         }
  458.         newloc = 3;
  459.         oldloc = loc;
  460.         return;
  461.     }
  462.     /*
  463.        closing -- no resurrection...
  464.     */
  465.     rspeak(131);
  466.     ++numdie;
  467.     normend();
  468. }
  469.  
  470. /*
  471.     Routine to process an object.
  472. */
  473. doobj()
  474. {
  475.     char i;
  476.     /*
  477.        is object here?  if so, transitive
  478.     */
  479.     if(fixed[object]==loc || here(object))
  480.         trobj();
  481.     /*
  482.         did he give grate as destination?
  483.     */
  484.     else if(object==GRATE) {
  485.         if(loc==1 || loc==4 || loc==7) {
  486.             motion=DEPRESSION;
  487.             domove();
  488.         }
  489.         else if(loc>9 && loc<15) {
  490.             motion=ENTRANCE;
  491.             domove();
  492.         }
  493.     }
  494.     /*
  495.         is it a dwarf he is after?
  496.     */
  497.     else if (dcheck() && dflag >= 2) {
  498.         object = DWARF;
  499.         trobj();
  500.     }
  501.     /*
  502.        is he trying to get/use a liquid?
  503.     */
  504.     else if( (liq()==object && here(BOTTLE)) ||
  505.          liqloc(loc)==object)
  506.         trobj();
  507.     else if(object==PLANT && at(PLANT2) &&
  508.         prop[PLANT2]==0) {
  509.         object=PLANT2;
  510.         trobj();
  511.     }
  512.     /*
  513.        is he trying to grab a knife?
  514.     */
  515.     else if(object==KNIFE && knfloc==loc) {
  516.         rspeak(116);
  517.         knfloc=-1;
  518.     }
  519.     /*
  520.        is he trying to get at dynamite?
  521.     */
  522.     else if(object==ROD && here(ROD2)) {
  523.         object=ROD2;
  524.         trobj();
  525.     }
  526.     else
  527.         printf("I see no %s here.\n",probj(object));
  528. }
  529.  
  530. /*
  531.     Routine to process an object being
  532.     referred to.
  533. */
  534. trobj()
  535. {
  536.     if(verb)
  537.         trverb();
  538.     else
  539.         printf("What do you want to do with the %s?\n",
  540.             probj(object));
  541. }
  542.  
  543. /*
  544.     Routine to print word corresponding to object
  545. */
  546. probj(object)
  547. {
  548.     int wtype,wval;
  549.     analyze(word1,&wtype,&wval);
  550.     return (wtype==1 ? word1 : word2);
  551. }
  552. /*
  553.     dwarf stuff.
  554. */
  555. dwarves()
  556. {
  557.     int i,j,k,try,attack,stick,dtotal;
  558.     /*
  559.         see if dwarves allowed here
  560.     */
  561.     if (newloc == 0 || forced(newloc) || cond[newloc]&NOPIRAT)
  562.         return;
  563.     /*
  564.         see if dwarves are active.
  565.     */
  566.     if (!dflag) {
  567.         if (newloc > 15)
  568.             ++dflag;
  569.         return;
  570.     }
  571.     /*
  572.         if first close encounter (of 3rd kind)
  573.         kill 0, 1 or 2
  574.     */
  575.     if (dflag == 1) {
  576.         if (newloc < 15 || pct(95))
  577.             return;
  578.         ++dflag;
  579.         for (i=1; i<3; ++i)
  580.             if (pct(50))
  581.                 dloc[rand()%5+1] = 0;
  582.         for (i=1; i<(DWARFMAX-1); ++i) {
  583.             if (dloc[i] == newloc)
  584.                 dloc[i] = daltloc;
  585.             odloc[i] = dloc[i];
  586.         }
  587.         rspeak(3);
  588.         drop(AXE,newloc);
  589.         return;
  590.     }
  591.     dtotal = attack = stick = 0;
  592.     for (i=1; i<DWARFMAX; ++i) {
  593.         if (dloc[i] == 0)
  594.             continue;
  595.         /*
  596.             move a dwarf at random.  we don't
  597.             have a matrix around to do it
  598.             as in the original version...
  599.         */
  600.         for (try=1; try<20; ++try) {
  601.             j = rand()%106+15; /* allowed area */
  602.             if (j!=odloc[i] && j!=dloc[i] &&
  603.                 !(i==(DWARFMAX-1) && cond[j]&NOPIRAT==1))
  604.                 break;
  605.         }
  606.         if (j==0)
  607.             j = odloc[i];
  608.         odloc[i] = dloc[i];
  609.         dloc[i] = j;
  610.         if ((dseen[i] && newloc >= 15) ||
  611.             dloc[i] == newloc || odloc[i] == newloc)
  612.             dseen[i] = 1;
  613.         else
  614.             dseen[i] = 0;
  615.         if (!dseen[i])
  616.             continue;
  617.         dloc[i] = newloc;
  618.         if (i==6)
  619.             dopirate();
  620.         else {
  621.             ++dtotal;
  622.             if (odloc[i] == dloc[i]) {
  623.                 ++attack;
  624.                 if (knfloc >= 0)
  625.                     knfloc = newloc;
  626.                 if (rand()%1000 < 95*(dflag-2))
  627.                     ++stick;
  628.             }
  629.         }
  630.     }
  631.     if (dtotal == 0)
  632.         return;
  633.     if (dtotal > 1)
  634.         printf("There are %d threatening little dwarves in the room with you!\n",dtotal);
  635.     else
  636.         rspeak(4);
  637.     if (attack == 0)
  638.         return;
  639.     if (dflag == 2)
  640.         ++dflag;
  641.     if (attack > 1) {
  642.         printf("%d of them throw knives at you!!\n",attack);
  643.         k = 6;
  644.     }
  645.     else {
  646.         rspeak(5);
  647.         k = 52;
  648.     }
  649.     if (stick <= 1) {
  650.         rspeak(stick+k);
  651.         if (stick == 0)
  652.             return;
  653.     }
  654.     else
  655.         printf("%d of them get you !!!\n",stick);
  656.     oldloc2 = newloc;
  657.     death();
  658. }
  659. /*
  660.     pirate stuff
  661. */
  662. dopirate()
  663. {
  664.     int j,k;
  665.     if (newloc == chloc || prop[CHEST] >= 0)
  666.         return;
  667.     k = 0;
  668.     for (j=50; j<=MAXTRS; ++j)
  669.         if (j != PYRAMID ||
  670.             (newloc != place[PYRAMID] &&
  671.              newloc != place[EMERALD])) {
  672.             if (toting(j))
  673.                 goto stealit;
  674.             if (here(j))
  675.                 ++k;
  676.         }
  677.     if (tally == tally2+1 && k == 0 && place[CHEST] == 0 &&
  678.         here(LAMP) && prop[LAMP] == 1) {
  679.         rspeak(186);
  680.         move(CHEST,chloc);
  681.         move(MESSAGE,chloc2);
  682.         dloc[6] = chloc;
  683.         odloc[6] = chloc;
  684.         dseen[6] = 0;
  685.         return;
  686.     }
  687.     if (odloc[6] != dloc[6] && pct(20)) {
  688.         rspeak(127);
  689.         return;
  690.     }
  691.     return;
  692.  
  693. stealit:
  694.  
  695.     rspeak(128);
  696.     if (place[MESSAGE] == 0)
  697.         move(CHEST,chloc);
  698.     move(MESSAGE,chloc2);
  699.     for (j=50; j<=MAXTRS; ++j) {
  700.         if (j==PYRAMID &&
  701.             (newloc == place[PYRAMID] ||
  702.              newloc == place[EMERALD]))
  703.             continue;
  704.         if (at(j) && fixed[j] == 0)
  705.             carry(j,newloc);
  706.         if (toting(j))
  707.             drop(j,chloc);
  708.     }
  709.     dloc[6] = chloc;
  710.     odloc[6] = chloc;
  711.     dseen[6] = 0;
  712. }
  713. /*
  714.     special time limit stuff...
  715. */
  716. stimer()
  717. {
  718.     int i;
  719.     foobar = foobar > 0 ?  -foobar : 0;
  720.     if (tally == 0 && loc >= 15 && loc != 33)
  721.         --clock;
  722.     if (clock == 0) {
  723.         /*
  724.             start closing the cave
  725.         */
  726.         prop[GRATE] = 0;
  727.         prop[FISSURE] = 0;
  728.         for (i=1; i<DWARFMAX; ++i)
  729.             dseen[i] = 0;
  730.         move(TROLL,0);
  731.         move((TROLL+MAXOBJ),0);
  732.         move(TROLL2,117);
  733.         move((TROLL2+MAXOBJ),122);
  734.         juggle(CHASM);
  735.         if (prop[BEAR] != 3)
  736.             dstroy(BEAR);
  737.         prop[CHAIN] = 0;
  738.         fixed[CHAIN] = 0;
  739.         prop[AXE] = 0;
  740.         fixed[AXE] = 0;
  741.         rspeak(129);
  742.         clock = -1;
  743.         closing = 1;
  744.         return(0);
  745.     }
  746.     if (clock < 0)
  747.         --clock2;
  748.     if (clock2 == 0) {
  749.         /*
  750.             set up storage room...
  751.             and close the cave...
  752.         */
  753.         prop[BOTTLE] = put(BOTTLE,115,1);
  754.         prop[PLANT] = put(PLANT,115,0);
  755.         prop[OYSTER] = put(OYSTER,115,0);
  756.         prop[LAMP] = put(LAMP,115,0);
  757.         prop[ROD] = put(ROD,115,0);
  758.         prop[DWARF] = put(DWARF,115,0);
  759.         loc = 115;
  760.         oldloc = 115;
  761.         newloc = 115;
  762.         put(GRATE,116,0);
  763.         prop[SNAKE] = put(SNAKE,116,1);
  764.         prop[BIRD] = put(BIRD,116,1);
  765.         prop[CAGE] = put(CAGE,116,0);
  766.         prop[ROD2] = put(ROD2,116,0);
  767.         prop[PILLOW] = put(PILLOW,116,0);
  768.         prop[MIRROR] = put(MIRROR,115,0);
  769.         fixed[MIRROR] = 116;
  770.         for (i=1; i<= MAXOBJ; ++i)
  771.             if (toting(i))
  772.                 dstroy(i);
  773.         rspeak(132);
  774.         closed = 1;
  775.         return(1);
  776.     }
  777.     if (prop[LAMP] == 1)
  778.         --limit;
  779.     if (limit <= 30 &&
  780.         here(BATTERIES) && prop[BATTERIES] == 0 &&
  781.         here(LAMP)) {
  782.         rspeak(188);
  783.         prop[BATTERIES] = 1;
  784.         if (toting(BATTERIES))
  785.             drop(BATTERIES,loc);
  786.         limit += 2500;
  787.         lmwarn = 0;
  788.         return(0);
  789.     }
  790.     if (limit == 0) {
  791.         --limit;
  792.         prop[LAMP] = 0;
  793.         if (here(LAMP))
  794.             rspeak(184);
  795.         return(0);
  796.     }
  797.     if (limit < 0 && loc <= 8) {
  798.         rspeak(185);
  799.         gaveup = 1;
  800.         normend();
  801.     }
  802.     if (limit <= 30) {
  803.         if (lmwarn || !here(LAMP))
  804.             return(0);
  805.         lmwarn = 1;
  806.         i = 187;
  807.         if (place[BATTERIES] == 0)
  808.             i = 183;
  809.         if (prop[BATTERIES] == 1)
  810.             i = 189;
  811.         rspeak(i);
  812.         return(0);
  813.     }
  814.     return(0);
  815. }
  816.